package me.zxk.qwert_poetry.dao;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import lombok.Data;

class CompositeKey4CollectionPoem {
    private Integer poemId;
    private Integer collectionId;
}

@Data
@Entity
@IdClass(CompositeKey4CollectionPoem.class)
public class CollectionPoem {
    @Column(name = "poem_id")
    @Id
    private Integer poemId;

    @Id
    @Column(name = "collection_id")
    private Integer collectionId;
}
